package com.hellogood.yaohuo.client.bussiness.tuihuo;

import java.util.LinkedHashMap;
import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.hellogood.yaohuo.client.bussiness.SearchController;
import com.hellogood.yaohuo.client.common.LoginUser;
import com.hellogood.yaohuo.client.common.SearchResultAsynCallback;
import com.hellogood.yaohuo.shared.entity.Org;
import com.hellogood.yaohuo.shared.services.OrgService;
import com.hellogood.yaohuo.shared.services.PeisongTuihuoService;
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.grid.ListGridField;

public class TuihuoSearchController extends SearchController {

	@Override
	public void searchForm(String orgCode, String startDate, String endDate, String rz) {
		PeisongTuihuoService.Util.getInstance().searchPeisongTuihuoFormByOrgCodeAndDate(orgCode, 0, startDate, endDate, rz, new SearchResultAsynCallback(listGrid));
	}

	@Override
	protected void buildFormFields() {
		orgItem.setTitle("门店");
		form.setFields(orgItem, startDateItem, endDateItem, accountSelectItem, searchItem);
	}

	@Override
	protected void buildListFields() {
		orgField.setTitle("门店");
		vendorField.setTitle("配送中心");
		fields = new ListGridField[] { codeField, orgField, vendorField, dateField, amountField, costField, zdUserField, zdDateField, rzDateField, remarkField };
	}
}
